/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.kidIcarus.decorator;

import com.kidIcarus.tools.ComboBoxUtil;
import com.kidIcarus.model.value.Value;
import com.kidIcarus.tools.ValueUtil;
import com.kidIcarus.weapon.WeaponCompleted;
import java.util.ArrayList;
import java.util.List;
import javax.swing.JComboBox;

/**
 *
 * @author squarezty
 */
public class RangedBox extends Decorator implements BoxFactory {

    ComboBoxUtil box;
    WeaponCompleted weapon;
    JComboBox jBox;

    public RangedBox(WeaponCompleted weapon,JComboBox jBox) {
        this.weapon = weapon;
        this.jBox=jBox;
    }

    public RangedBox() {
    }

    public JComboBox getjBox() {
        return jBox;
    }
    
    public JComboBox getjBox1(){
        return null;
    }
    
    public JComboBox getjBox2(){
        return null;
    }

    public void setjBox(JComboBox jBox) {
        this.jBox = jBox;
    }

    public List<Value> getBoxValueList() {
        List<Value> list = new ArrayList();
        double[] d = new double[]{
            0.0, 14.9, 23.2, 31.5, 39.8, 48.1, 56.4, 64.7, 73.0, 81.3, 89.6, 97.9, 106.0
        };
        for (int i = 0; i < 13; i++) {
            Value v = new Value();
            v.setId(String.valueOf(i));
            v.setValue(d[i]);
            list.add(v);
        }
        return list;
    }

    public double value() {
        double d1 = weapon.value();
        double d2 = (new ValueUtil()).value1(this);
        return d1 + d2;
    }

    public String getDescription() {
        return "";
    }
}
